﻿<UserControl x:Class="DiscoveryLogic.Analytics.Modules.Networks.CoAuthorNetworkInMedline"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
    Height="Auto" Width="450" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="125"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="100"/>
            <RowDefinition Height="36"/>
            <RowDefinition Height="360"/>
            <RowDefinition Height="36"/>
            <RowDefinition Height="36"/>
            <RowDefinition Height="36"/>
            <RowDefinition Height="36"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>

        <TextBlock 
            Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
            VerticalAlignment="Top" HorizontalAlignment="Left"
            Margin="5" FontSize="15" TextWrapping="Wrap">
            Given list of mesh terms, this step will build network of orgs
            that are sponsored by shared grants in publications. 
            Citation are retrieved from medline DB through CitationMesh linkage.
            Grants are retrieved from citation-grant link 
            (publications that cites grant number). Orgs are 
            retrieved from grants via external org link.
        </TextBlock>
        <TabControl
            Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
            <TabItem Header="Mesh terms">
                <StackPanel Orientation="Vertical">
                    <TextBlock
                        Margin="5,0,0,0" TextWrapping="Wrap"
                        FontSize="14" FontWeight="Bold" HorizontalAlignment="Left"
                        VerticalAlignment="Center">
                        Enter mesh term, one entry per line. Use "AND" to join two mesh terms in one line
                    </TextBlock>
                    <TextBox
                        VerticalAlignment="Top" Margin="5" Height="350"
                        TextWrapping="Wrap" x:Name="txtKeyWords" 
                        AcceptsReturn="True"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="Sql">
                <StackPanel Orientation="Vertical">
                    <TextBlock
                        Margin="5,0,0,0" TextWrapping="Wrap"
                        FontSize="14" FontWeight="Bold" HorizontalAlignment="Left"
                        VerticalAlignment="Center">
                        Enter SQL that return list of PMIDs
                    </TextBlock>
                    <TextBox
                        VerticalAlignment="Top" Margin="5" Height="350"
                        TextWrapping="Wrap" x:Name="txtSql" 
                        AcceptsReturn="True"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="Flags">
                <StackPanel Orientation="Vertical" Margin="5" HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="250"/>
                        </Grid.RowDefinitions>
                        
                        <Label Grid.Row="0" Grid.Column="0"
                               Margin="5,0,0,0" VerticalAlignment="Center">Flag:</Label>
                        <TextBox Grid.Row="0" Grid.Column="1" x:Name="txtFlagName"
                                 Margin="5,0,5,0" VerticalAlignment="Center"></TextBox>
                        
                        <Label Grid.Row="1" Grid.Column="0"
                               Margin="5,0,5,0" VerticalAlignment="Center">Mesh terms:</Label> 
                        <TextBox Grid.Row="1" Grid.Column="1" x:Name="txtFlagMeshTerms"
                                 Margin="5,0,5,0" VerticalAlignment="Center"></TextBox>
                        
                        <Button Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right"
                                x:Name="btnAddFlagMeshTerms" Content="Add" Width="50"
                                VerticalAlignment="Center" Margin="5,0,5,0" Click="btnAddFlagMeshTerms_Click"></Button>
                        
                        <TextBlock Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
                                   x:Name="txtFlagMeshTermsBindings" Margin="5" HorizontalAlignment="Stretch"
                                   VerticalAlignment="Stretch"></TextBlock>
                    </Grid>
                </StackPanel> 
            </TabItem>
        </TabControl>
  
        <Label
            Grid.Row="3" Grid.Column="0" VerticalAlignment="Center"
            Margin="5,0,0,0">
            Publication years:
        </Label>
        <StackPanel
            Grid.Row="3" Grid.Column="1" VerticalAlignment="Center"
            Orientation="Horizontal" Margin="5,0,5,0">
            <ComboBox x:Name="cboFromPubYear" Width="60" />
            <TextBlock Text="->" Margin="10,0,10,0"/>
            <ComboBox x:Name="cboToPubYear" Width="60" />
        </StackPanel>

        <Label
            Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"
            Margin="5,0,0,0">
            Min Pubs per person:
        </Label>
        <TextBox
            Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" x:Name="txtMinPubsPerson"
            Margin="5,0,0,0" HorizontalAlignment="Left" Width="60" Text="10"></TextBox>
        
        <Label
            Grid.Row="5" Grid.Column="0" VerticalAlignment="Center"
            Margin="5,0,0,0">
            Author dedup:
        </Label>
        <ComboBox
            Grid.Row="5" Grid.Column="1" VerticalAlignment="Center"
            Margin="5,0,5,0" x:Name="cboDedupPersons"></ComboBox>

        <Label
            Grid.Row="6" Grid.Column="0" VerticalAlignment="Center"
            Margin="5,0,0,0">
            Network name:
        </Label>
        <TextBox
            Grid.Row="6" Grid.Column="1" VerticalAlignment="Center"
            Margin="5,0,5,0" x:Name="txtNetworkName"></TextBox>

        <StackPanel
            Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2"
            VerticalAlignment="Center" HorizontalAlignment="Right"
            Orientation="Horizontal" Margin="5">
            <Button x:Name="btnCancel" Content="Cancel" Width="66" Margin="0,0,5,0" Click="btnCancel_Click" />
            <Button x:Name="btnOK" Content="OK" Width="66" Margin="0,0,5,0" Click="btnOK_Click" />
        </StackPanel>
    </Grid>
</UserControl>
